package cn.com.chengmandian.bike.service;

import cn.com.chengmandian.bike.dto.RentOrderDto;
import cn.com.chengmandian.bike.dto.RentOrderReletForm;
import cn.com.chengmandian.bike.model.EbDeviceBike;
import cn.com.chengmandian.bike.model.EbRefundInfo;
import cn.com.chengmandian.bike.model.EbRentCombo;
import cn.com.chengmandian.bike.model.EbRentOrder;
import cn.com.chengmandian.bike.model.vo.RentOrderVo;
import cn.com.chengmandian.core.web.pojo.AgentInfo;
import cn.com.chengmandian.core.web.pojo.AgentUser;
import cn.com.chengmandian.core.web.pojo.AjaxResult;
import cn.com.chengmandian.service.bike.constants.DeviceCommandEnum;
import cn.com.chengmandian.service.bike.constants.UserTypeEnum;
import cn.com.chengmandian.service.bike.form.RentEndOrderForm;
import cn.com.chengmandian.service.bike.form.RentRefundForm;
import cn.com.chengmandian.service.bike.form.RentReturnBikeForm;
import cn.com.chengmandian.service.bike.pojo.BikeCommandNotify;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 电单车运营-分时租赁订单 服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2023-07-10
 */
public interface IEbRentOrderService extends IService<EbRentOrder> {

    IPage<RentOrderVo> pages(RentOrderDto dto);

    EbRentOrder getByPayId(Integer payId);

    RentOrderVo detail(Integer id);

    RentOrderVo getComboRunning(Integer memberId);

    EbRentOrder getStatusOrder(Integer memberId, Integer status);

    EbRentOrder getMemberRentEndOrder(Integer memberId);

    List<EbRentOrder> getByBike(String bikeNo);

    EbRentOrder getComboRent(Integer memberId);

    void endOrder(RentEndOrderForm form, Boolean isSys);

    void rentRefund(RentRefundForm form);

    void rentOrderCloseLock(EbRentOrder rentOrder, EbDeviceBike deviceBike);

    void rentRefundSuccess(EbRefundInfo ebRefundInfo, String payNo);

    EbRentOrder createRecord(Integer memberId, Integer payId, String payNo, Integer areaId, BigDecimal money, EbRentCombo combo);

    void checkRentBike(EbDeviceBike deviceBike);

    void rentBike(EbRentOrder rentOrder, EbDeviceBike deviceBike, AgentUser agentUser);

    void sendOpenBike(EbRentOrder rentOrder, AgentUser agentUser, Integer userType);

    void orderReturn(EbRentOrder rentOrder, AgentUser agentUser, Integer userType);

    void orderSendCommand(Integer id, DeviceCommandEnum command, AgentUser agentUser, UserTypeEnum member);

    AjaxResult reletOrder(String clientIp, RentOrderReletForm form, AgentUser agentUser, AgentInfo agentInfo);

    void reletOrderSuccess(String payNo, String channelNo, Integer reletOrderId);

    void returnOrder(RentReturnBikeForm form, Boolean isSys);

    void rentOrderPaySuccess(String payNo, String channelNo);

    void orderHandleCommand(BikeCommandNotify bikeCommandNotify);
}
